package com.deep.test.designpattern.factory;

/**
 * <p>Description:</p>
 * Created with IDEA
 * author:hudepin
 * createTime:2018/5/16 16:12
 */
public class SimpleFactory {
    public Milk getMilk(String name){
        if("伊利".equals(name)){
            return new YiLi();
        }else if("蒙牛".equals(name)){
            return new Mengniu();
        }else if("伊利".equals(name)){
            return new YiLi();
        }else {
            return null;
        }
    }
}
